#include <stdio.h>

#define LOWER 0
#define UPPER 100 //宏定义没有分号哟

int main(){

    int i = 1;
    int j = 2;

    int x = i + j;
    float pai = 3.1425926;

    printf("%d %d i+j=%d\n", i, j, x);
    printf("%5.3f\n", pai);
    printf("%d\n", LOWER);
    printf("%d\n", UPPER);

    //不等号的优先级
    int age = 10;
    int myage, myage2;
    myage = age != 100;
    myage2 = age = 100;
    printf("myage = %d, myage2 = %d\n", myage, myage2);//output 1, 100,因为不等号!=的运算优先级比等号的高。
    
    //单引号里的内容等于字符对应的机器字符集数字
    char numA = 'a';
    char numB = "b";
    printf("a = %d\n b = %d\n", numA, numB);//output 97, -98

    char test = 100;
    //char test = '100';//error
    int testplus = 200;
    int re;
    printf("test = %d, testplus = %d, re = %d", test, testplus, test + testplus);

    char maxChar = 127;//单字符，一个byte 8bit，除去一个符号位，只能表示-128到127
    // char maxChar = 128;//error

    // 'a' 和 "a" 的区别，前者表示一个整数97，后者表示一个字符串，物理储存包含一个字符a和一个结束符'\0'，实际是占2位哟，虽然strlen("a")等于1，因为strlen函数不会算'\0'

    return 0;
}